package com.caiyigo.baihua.dto;

import java.util.ArrayList;
import java.util.List;

/**
 * @author caihaihui
 * 
 */
public class DataGrid<T> implements java.io.Serializable {

	public int total = 0;
	public int page;
	public String sort = "";
	public String order = "";
	public List<T> rows = new ArrayList<T>();

	public int getTotal() {
		return total;
	}

	public void setTotal(int total) {
		this.total = total;
	}

	public List<T> getRows() {
		return rows;
	}

	public void setRows(List<T> rows) {
		this.rows = rows;
	}

	/**
	 * @return the page
	 */
	public int getPage() {
		return page;
	}

	/**
	 * @param page
	 *            the page to set
	 */
	public void setPage(int page) {
		this.page = page;
	}

	/**
	 * @return the sort
	 */
	public String getSort() {
		return sort;
	}

	/**
	 * @param sort
	 *            the sort to set
	 */
	public void setSort(String sort) {
		this.sort = sort;
	}

	/**
	 * @return the order
	 */
	public String getOrder() {
		return order;
	}

	/**
	 * @param order
	 *            the order to set
	 */
	public void setOrder(String order) {
		this.order = order;
	}

	/**
	 * @param total
	 * @param page
	 * @param sortName
	 * @param sortOrder
	 * @param rows
	 */
	public DataGrid(int total, int page, String sort, String order, List<T> rows) {
		super();
		this.total = total;
		this.page = page;
		this.sort = sort;
		this.order = order;
		this.rows = rows;
	}

	public DataGrid() {
	}

	/**
	 * @param page
	 * @param rows
	 */
	public DataGrid(int total,int page, List<T> rows) {
		super();
		this.total = total;
		this.page = page;
		this.rows = rows;
	}

}